home *** CD-ROM | disk | FTP | other *** search
/ C/C++ Users Group Library 1996 July / C-C++ Users Group Library July 1996.iso / vol_200 / 271_02 / ibmtype.doc < prev    next >
Text File  |  1987-08-18  |  1KB  |  39 lines

  1.  
  2.  
  3.  
  4.         NAME
  5.                 ibmtype -- find out type of computer
  6.  
  7.         SYNOPSIS
  8.                 r = ibmtype();
  9.                 int r;   r = 0 for PC or XT, 1 for PC Jr.,
  10.                          2 for AT, 3 for unknown type
  11.  
  12.  
  13.         DESCRIPTION
  14.         This function examines the byte in ROM at F000:FFFEh.
  15.         For real IBM computers, this should be:
  16.            0xff  PC
  17.            0xfe  XT
  18.            0xfd  JR
  19.            0xfc  AT
  20.         Many close clones will also encode this byte in the above manner,
  21.         although there is no requirement for this feature.
  22.  
  23.         CAVEAT
  24.         The results of this test should be taken with a grain of salt
  25.         the size of Salt Lake City.  Even IBM has shipped XTs with
  26.         the PC id byte.  The NOVAS AT clone correctly has 0xfc,
  27.         but the Z-NIX XT clone (which is a very close clone) has 0x05.
  28.         Don't depend too heavily on the results being really accurate.
  29.  
  30.         EXAMPLE
  31.                  r = ibmtype();
  32.                  if(r == 2) printf("This machine is an AT, maybe!");
  33.  
  34.  
  35.  
  36.  
  37.  
  38.         This function is found in SMTCx.LIB for the Turbo-C Compiler
  39.